package com.qf.qflivehou.controller;

import com.qf.qflivehou.mapper.repository.RotationRepository;
import com.qf.qflivehou.pojo.respVo.ResponseData;
import com.qf.qflivehou.service.RotationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Mr.Liu
 * @date 2022/1/10 21:39
 */

/**
 * 轮播图处理层
 */
@RestController
@RequestMapping("/portal")
public class RotationController {
    @Autowired
    private RotationService rotationService;

    /**
     * 通过轮播图状态查询所有,并按顺序显示
     * @return
     */
    @PostMapping("/findRotation")
    public ResponseData findRotation(){
        ResponseData responseData = rotationService.findRotation("start");
        return responseData;
    }
}
